

package com.yami.shop.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.aspectj.weaver.ast.Var;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yami.shop.bean.model.PickAddr;
import com.yami.shop.dao.PickAddrMapper;
import com.yami.shop.service.PickAddrService;

import java.util.List;


@Service
public class PickAddrServiceImpl extends ServiceImpl<PickAddrMapper, PickAddr> implements PickAddrService {

    @Autowired
    private PickAddrMapper pickAddrMapper;


    @Override
    public List<PickAddr> getPickAddrByShopId(Long shopId) {

        LambdaQueryWrapper<PickAddr> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(PickAddr::getShopId,shopId);
        List<PickAddr> pickAddrs = pickAddrMapper.selectList(queryWrapper);
        return pickAddrs;
    }

    @Override
    public PickAddr getPickAddrById(Long AddrId) {
        return pickAddrMapper.selectById(AddrId);
    }
}
